package com.zdd.ehe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author ZhuiZhu
 * @since 2023-03-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("p_role_permission")
@ApiModel(value = "RolePermission对象", description = "")
public class RolePermission implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "role_id")
    @ApiModelProperty("角色编号")
    private Integer roleId;

    @TableField(value = "permission_id")
    @ApiModelProperty("权限编号")
    private Integer permissionId;

    @TableField(exist = false)
    @ApiModelProperty("角色标识")
    private String role;

    @TableField(exist = false)
    @ApiModelProperty("角色名称")
    private String roleName;

    @TableField(exist = false)
    @ApiModelProperty("角色描述")
    private String roleIntro;

    @TableField(exist = false)
    @ApiModelProperty("角色状态")
    private String roleStatus;

    @TableField(exist = false)
    @ApiModelProperty("权限标识")
    private String permission;

    @TableField(exist = false)
    @ApiModelProperty("权限名称")
    private String permissionName;

    @TableField(exist = false)
    @ApiModelProperty("权限描述")
    private String permissionIntro;

    @TableField(exist = false)
    @ApiModelProperty("权限状态")
    private String permissionStatus;

    @TableField(exist = false)
    @ApiModelProperty("允许访问路径")
    private String permissionUrl;

    @TableField(value = "authorize_time")
    @ApiModelProperty("授权时间")
    private LocalDateTime authorizeTime;

    @TableField(value = "status")
    @ApiModelProperty("授权状态")
    private String authorizeStatus;

    public Integer getId() {
        return id;
    }


    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    @Override
    public String toString() {
        return "RolePermission{" +
            "id = " + id +
            ", roleId = " + roleId +
            ", permissionId = " + permissionId +
        "}";
    }
}
